package com.first;

import java.util.Scanner;

public class Bank {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);


        System.out.println("请输入你存钱的金额：");

        int money = sc.nextInt();

        if (money > 1000) {

            System.out.println("请输入您存款的年限：");
            int year = sc.nextInt();


            if (year == 1) {
                System.out.println("您一共能取到" + (money + money * 0.0225 * year));
            } else if (year == 2) {
                System.out.println("您一共能取到" + (money + money * 0.027 * year));
            } else if (year == 3) {
                System.out.println("您一共能取到" + (money + money * 0.0325 * year));
            } else if (year == 5) {
                System.out.println("您一共能取到" + (money + money * 0.0336 * year));
            } else {
                System.out.println("您输入的年限有误");
            }

        } else {
            System.out.println("您存入的金额不满1000  请从新输入");
        }


    }
}
